package cn.jeefast.modules.platform.service.impl;

import cn.jeefast.common.entity.MbResearchStep;
import cn.jeefast.common.utils.R;
import cn.jeefast.modules.platform.dao.MbResearchStep1Dao;
import cn.jeefast.modules.platform.service.MbResearchStep1Service;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 研究阶段 服务实现类
 * </p>
 *
 * @author theodo
 * @since 2020-01-06
 */
@Service
public class MbResearchStep1ServiceImpl extends ServiceImpl<MbResearchStep1Dao, MbResearchStep> implements MbResearchStep1Service {

    @Autowired
    private MbResearchStep1Dao researchStepDao;

    @Override
    public R addOrSave(MbResearchStep researchStep) {
        if(researchStep.getStepId()!=null){
            researchStepDao.updateById(researchStep);
        }else{
            researchStepDao.insert(researchStep);
        }
        return R.ok();
    }
}
